import {
  platformGoodsList,
  addCoupon,
  couponDetail,
  updateCoupon,
  couponFilterOptions,
  couponList,
  setCouponOver,
  deleteCoupon,
  getShipTypes,
  couponOrderList,
} from '@/services/Coupon'

export default () => {
  // 获取商品列表【旧接口，平台端商品列表】
  const PlatformGoodsList = (params: any) => {
    return platformGoodsList(params)
  }

  // 创建优惠券
  const AddCoupon = (params: any) => {
    return addCoupon(params)
  }

  // 优惠券详情
  const CouponDetail = (params: any) => {
    return couponDetail(params)
  }

  // 修改优惠券
  const UpdateCoupon = (params: any) => {
    return updateCoupon(params)
  }

  // 优惠券列表筛选项下拉列表
  const CouponFilterOptions = (params: any) => {
    return couponFilterOptions(params)
  }

  // 优惠券列表
  const CouponList = (params: any) => {
    return couponList(params)
  }

  // 结束优惠券
  const SetCouponOver = (params: any) => {
    return setCouponOver(params)
  }

  // 删除优惠券(仅已结束券可删除)
  const DeleteCoupon = (params: any) => {
    return deleteCoupon(params)
  }

  // 删除优惠券(仅已结束券可删除)
  const GetShipTypes = (params: any) => {
    return getShipTypes(params)
  }

  // 优惠券列表订单信息
  const CouponOrderList = (params: any) => {
    return couponOrderList(params)
  }

  return {
    PlatformGoodsList,
    AddCoupon,
    CouponDetail,
    UpdateCoupon,
    CouponFilterOptions,
    CouponList,
    SetCouponOver,
    DeleteCoupon,
    GetShipTypes,
    CouponOrderList,
  }
}
